package cn.ronghuanet.gift.exception;

/**
 * 自定义BusinessException来处理已知异常,就可以区分是已知异常还是未知异常
 */
public class BusinessException extends RuntimeException {

    private Integer code;
    public BusinessException() {
    }

    public BusinessException(String message) {
        super(message);
    }
    public BusinessException(String message,Integer code) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
